/*
 * export_anime_c.c
 *
 *  Created on: 2015年4月12日
 *      Author: yami
 */


/**
 * @file		export_anime_c.c
 * @date		2015-04-12 20:05:28
 * @author		yami
 * @brief
 * 导出动画数据的源码
 */


#include <stdio.h>
#include <stdlib.h>
#include <string.h>

typedef unsigned int u32;

typedef struct{
	char		name[12];
	u32			uC_;		//事件偏移
	u32			u10_;		//事件数据
	u32			u14_;		//绘制坐标
	u32			u18_;		//绘制坐标2
	u32			u1C_;		//调色板
}anime_data;



int		out_C_(anime_data*ad,int size){
	int			i;
	const	char*	name_fomat	=	"%12s,";
	const	char*	data_fomat	=	"0x%08X,";
	const	char*	space_format	=	"%.4s";
	for(i=0;i<size;i++){

		printf("[0x%04X]",i);
		printf(" = { ");
		printf(name_fomat,ad->name);
		printf(data_fomat,ad->uC_);
		printf(space_format,"");
		printf(data_fomat,ad->u10_);
		printf(space_format,"");
		printf(data_fomat,ad->u14_);
		printf(space_format,"");
		printf(data_fomat,ad->u18_);
		printf(space_format,"");
		printf(data_fomat,ad->u1C_);
		printf("}");

		printf(",");
		printf("\n");
	}
	return 0;
}





